import Request from '@/utils/request'

const state = () => ({
	backUrl: '/index',
})
const getters = {
	backUrl(state) {
		return state.backUrl;
	}
}
const mutations = {
	set_backUrl: (state, data) => {
		state.backUrl = data
	},
}
const actions = {
	async get_data({commit}, params) { 
		return new Promise((resolve,reject)=>{
			Request.post('http://api.ej12366.video/app/course/list',params,{unLoading:true})
			.then(res=>{
				resolve(res.data) 
			})
		})
	},
}

export default {
	namespaced: true,
	state,
	getters,
	mutations,
	actions
}
